package com.imust.config;


import com.imust.pojo.Car;
import com.imust.pojo.Pet;
import com.imust.pojo.User;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration(proxyBeanMethods = false)
@ConditionalOnMissingBean(name = "tom")
public class Myconfig {

    @Bean
    public User user01(){
        return new User("zhangsan", 23);
    }

    //@Bean
    public Pet tom(){
        return new Pet("tomcat");
    }

}
